<?
if(count($news)){
    echo "<ul id=\"news_list\">";
    foreach ($news as $item) {
        $item->content = Text::limit_words(strip_tags($item->content), '40', '...');
        echo "<li>";
        if(!empty($item->src))
            echo "<img src=\"{$item->src}\"/>";
        echo "<p><span class=\"date\">".date("d.m.Y", strtotime($item->created))."</span> <a class=\"title\" href=\"/news{$item->href}\">{$item->html_title}</a></p>
                <p>$item->content</p>  
                <div class=\"spacer\"></div>
              </li>";  
    }
    echo "</ul>";
}

echo "<div id=\"pagination\">$page_links</div>";

?>